package cn.wolfcode.trip.base.query;

import lombok.Getter;
import lombok.Setter;
import org.springframework.util.StringUtils;

@Getter
@Setter
public class QueryObject {
    private Integer currentPage = 1;
    private Integer pageSize = 5;

    private String keyword;

    public String getKeyword() {
        return empty2Null(keyword);
    }

    private String orderBy;//排序规则

    protected String empty2Null(String str) {
        return StringUtils.hasLength(str) ? str : null;
    }
}
